<?php

declare(strict_types=1);

namespace app\example\controller;

use app\admin\BaseAdminController;
use think\facade\View;

class Plugin extends BaseAdminController
{
    public function index()
    {
        View::assign('title', '表单向导/常用插件');
        View::assign('addJs', addJs(['wizard']));
        return View::fetch();
    }

    public function datepicker()
    {
        View::assign('title', '日期选取器/常用插件');
        View::assign('addJs', addJs(['datepicker', 'moment', 'datetimepicker']));
        return View::fetch();
    }

    public function daterangepicker()
    {
        View::assign('title', '时间段选择器/常用插件');
        View::assign('addJs', addJs(['moment', 'daterangepicker']));
        return View::fetch();
    }

    public function colorpicker()
    {
        View::assign('title', '选色器/常用插件');
        View::assign('addJs', addJs(['colorpicker']));
        return View::fetch();
    }

    public function chartjs()
    {
        View::assign('title', 'chart.js/常用插件');
        View::assign('addJs', addJs(['chart']));
        return View::fetch();
    }

    public function jconfirm()
    {
        View::assign('title', '对话框/常用插件');
        View::assign('addJs', addJs(['confirm']));
        return View::fetch();
    }

    public function tags_input()
    {
        View::assign('title', '标签插件/常用插件');
        View::assign('addJs', addJs(['tagsinput']));
        return View::fetch();
    }

    public function notify()
    {
        View::assign('title', '通知消息/常用插件');
        View::assign('addJs', addJs(['notify']));
        return View::fetch();
    }

    public function maxlength()
    {
        View::assign('title', '长度判断/常用插件');
        View::assign('addJs', addJs(['maxlength']));
        return View::fetch();
    }

    public function select1()
    {
        View::assign('title', '下拉选择/常用插件');
        View::assign('addJs', addJs(['select']));
        return View::fetch();
    }

    public function fullcalendar()
    {
        View::assign('title', '日程插件/常用插件');
        View::assign('addJs', addJs(['datepicker', 'moment', 'datetimepicker', 'fullcalendar']));
        return View::fetch();
    }

    public function loading()
    {
        View::assign('title', 'loading插件/常用插件');
        return View::fetch();
    }

    public function attachment()
    {
        View::assign('title', '附件插件/常用插件');
        View::assign('addJs', addJs(['sortable']));
        return View::fetch();
    }
}
